public static void main(String[] args) throws InterruptedException {

    GameThread game = new GameThread();
    //使用线程池
    ExecutorService threadPool = new ThreadPoolExecutor(
            TimeUnit.SECONDS,
            new ArrayBlockingQueue(1),
            Executors.defaultThreadFactory(),
            new ThreadPoolExecutor.DiscardPolicy());

    threadPool.execute(game);
    threadPool.execute(game);
    threadPool.execute(game);
    Thread playGame = new Thread(game);
   playGame.start();
}
